#ifndef JMAINFRAME_H
#define JMAINFRAME_H
#include "app_guis.h"
#include <boost/bimap.hpp>
#include <string>


const wchar_t PAGE_KEY_ZYBR[]=L"在院病人";

class JMainFrame : public JMainFrameUI
{
protected:
    boost::bimap<std::wstring,wxWindow*> m_pages;
public:
    wxAuiNotebook * getNoteBook()const{return m_notebook;}
    bool register_page(const std::wstring & lsh,wxWindow * pwnd);
    bool unregister_page(const std::wstring & lsh);
    bool unregister_page(wxWindow*pwnd);
    bool has_page(const std::wstring & lsh)const;
    bool has_page(wxWindow* pwnd)const;
    std::wstring get_page_key(wxWindow* pwnd);
    wxWindow*    get_page_from_key(const std::wstring & key);
    void on_create_bleditor(const std::wstring & xm,const std::wstring & blh,const std::wstring & lsh);
public:
    JMainFrame(wxWindow* parent=NULL);
    virtual ~JMainFrame();
    virtual void OnCloseMainFrame( wxCloseEvent& event ) ;
    virtual void OnCommandExit( wxCommandEvent& event ) ;
    void OnPageDestroy(wxWindowDestroyEvent &event);
    virtual void OnCommandZYBR( wxCommandEvent& event );


};

#endif // JMAINFRAME_H
